DROP TABLE IF EXISTS jms_dim.dim_lmdm_sys_area;
CREATE EXTERNAL TABLE jms_dim.dim_lmdm_sys_area(
 ID bigint comment "",  --NUMBER(11)
 PARENT_ID bigint comment "父级ID",  --NUMBER(11)
 COUNTRY_ID bigint comment "所属国家",  --NUMBER(11)
 CODE string comment "区域编码",  --NVARCHAR2(60)
 INTERNATIONAL_CODE string comment "国际编码",  --NVARCHAR2(60)
 THREE_CODE string comment "三字码",  --NVARCHAR2(6)
 TYPE bigint comment "区域类型",  --NUMBER(11)
 CN_NAME string comment "中文名称",  --NVARCHAR2(60)
 EN_NAME string comment "英文名称",  --NVARCHAR2(120)
 ABBREVIATION string comment "简称",  --NVARCHAR2(60)
 NATIVE_NAME string comment "母语名称",  --NVARCHAR2(60)
 AREA_NO string comment "区号",  --NVARCHAR2(60)
 ZIPCODE string comment "邮政编码",  --NVARCHAR2(12)
 LONGITUDE string comment "经度",  --NVARCHAR2(50)
 LATITUDE string comment "纬度",  --NVARCHAR2(50)
 IS_ENABLE smallint comment "是否启用",  --NUMBER(4)
 IS_DELETE smallint comment "是否删除:1未删除,2已删除",  --NUMBER(4)
 CREATE_BY bigint comment "创建人ID",  --NUMBER(11)
 UPDATE_BY bigint comment "最后更新人ID",  --NUMBER(11)
 CREATE_BY_NAME string comment "创建人名称",  --NVARCHAR2(50)
 UPDATE_BY_NAME string comment "最后修改人名称",  --NVARCHAR2(50)
 CREATE_TIME timestamp comment "创建时间",  --DATE
 UPDATE_TIME timestamp comment "更新时间",  --DATE
 VERSION string comment "版本号",  --NVARCHAR2(10)
 SORT smallint comment "排序",  --NUMBER(4)
 DTB_NAME string comment "大头笔名称",  --NVARCHAR2(50)
 AD_CODE string comment "高德编码",  --NVARCHAR2(30)
 NO_DISTRICT_FLAG tinyint comment "无区县标识 1:无区县,2:有区县"  --NUMBER(1)
 )
 COMMENT '系统区域维表'
 STORED AS PARQUET
 LOCATION '/dw/hive/jms_dim.db/external/dim_lmdm_sys_area'
 TBLPROPERTIES (
 'discover.partitions'='false',
 'parquet.column.index.access'='true'
 );